package com.yuntian.dto;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.math.BigDecimal;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class ProductOrderDataDto {
    //商品代码
    private String M00201;

    //商品名称
    private String M00202;

    //销售数量
    private Integer T00203;

    //销售单价
    private BigDecimal T00204;

    //销售总额
    private BigDecimal sum;

    public BigDecimal getSum() {
        if (T00203 == null || T00204 == null) {
            return BigDecimal.ZERO;
        }
        return T00204.multiply(new BigDecimal(T00203));
    }


}
